import Mock from 'mockjs'

Mock.mock('/api/users',( req, res) =>{
  return Mock.mock({
    "user|20-100": [{
      'order_number|1-1000': 0,
      'phone_number|11': 0,
      'order_address': '@city(true)',
      'order_status|1-3': 0
    }]
  })
}),
Mock.mock('/api/admins',( req, res) =>{
  return Mock.mock({
    "admin|10-30": [{
      'adminName': '@cname',
      'registerDate': '@date("yyyy-MM--dd")',
      'registerAddress': '@city(true)',
      'limit|1': ['管理员权限','超级管理员权限']
    }]
  })
}),
Mock.mock('/api/datas',(req,res) => {
  return Mock.mock ({
    "data": [{
      "id": 1,
      "username": "18710559852",
      "password": "yn12345"
    }]
  })
})
